package com.itheima.api.arrays.demo01;

import java.util.Arrays;

public class ArraysDemo {

    public static void main(String[] args) {

        int[] arr = {10,2,4,3,9,8,6};


        System.out.println(arr);
        System.out.println("----------------------");

        String arrayToString = Arrays.toString(arr);
        System.out.println(arrayToString);
        System.out.println("----------------------");

        Arrays.sort(arr);
        String toString = Arrays.toString(arr);
        System.out.println(toString);
        System.out.println("-----------------------");

        int binarySearch = Arrays.binarySearch(arr, 7);
        System.out.println(binarySearch);
    }
}
